import 'package:safetymonitor/generated/json/base/json_convert_content.dart';
import 'package:safetymonitor/app/data/entities/home/monitor/safe_real_time_monitor_page_entity.dart';

SafeRealTimeMonitorPageEntity $SafeRealTimeMonitorPageEntityFromJson(Map<String, dynamic> json) {
  final SafeRealTimeMonitorPageEntity safeRealTimeMonitorPageEntity = SafeRealTimeMonitorPageEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    safeRealTimeMonitorPageEntity.id = id;
  }
  final int? companyId = jsonConvert.convert<int>(json['companyId']);
  if (companyId != null) {
    safeRealTimeMonitorPageEntity.companyId = companyId;
  }
  final String? companyName = jsonConvert.convert<String>(json['companyName']);
  if (companyName != null) {
    safeRealTimeMonitorPageEntity.companyName = companyName;
  }
  final int? pointId = jsonConvert.convert<int>(json['pointId']);
  if (pointId != null) {
    safeRealTimeMonitorPageEntity.pointId = pointId;
  }
  final String? point = jsonConvert.convert<String>(json['point']);
  if (point != null) {
    safeRealTimeMonitorPageEntity.point = point;
  }
  final String? deviceCode = jsonConvert.convert<String>(json['deviceCode']);
  if (deviceCode != null) {
    safeRealTimeMonitorPageEntity.deviceCode = deviceCode;
  }
  final int? alarmType = jsonConvert.convert<int>(json['alarmType']);
  if (alarmType != null) {
    safeRealTimeMonitorPageEntity.alarmType = alarmType;
  }
  final int? alarmLevel = jsonConvert.convert<int>(json['alarmLevel']);
  if (alarmLevel != null) {
    safeRealTimeMonitorPageEntity.alarmLevel = alarmLevel;
  }
  final double? val = jsonConvert.convert<double>(json['val']);
  if (val != null) {
    safeRealTimeMonitorPageEntity.val = val;
  }
  final String? alarmStartTime = jsonConvert.convert<String>(json['alarmStartTime']);
  if (alarmStartTime != null) {
    safeRealTimeMonitorPageEntity.alarmStartTime = alarmStartTime;
  }
  final String? alarmEndTime = jsonConvert.convert<String>(json['alarmEndTime']);
  if (alarmEndTime != null) {
    safeRealTimeMonitorPageEntity.alarmEndTime = alarmEndTime;
  }
  final int? status = jsonConvert.convert<int>(json['status']);
  if (status != null) {
    safeRealTimeMonitorPageEntity.status = status;
  }
  final int? disposalMethod = jsonConvert.convert<int>(json['disposalMethod']);
  if (disposalMethod != null) {
    safeRealTimeMonitorPageEntity.disposalMethod = disposalMethod;
  }
  final String? disposalMeasures = jsonConvert.convert<String>(json['disposalMeasures']);
  if (disposalMeasures != null) {
    safeRealTimeMonitorPageEntity.disposalMeasures = disposalMeasures;
  }
  final String? disarmingDescription = jsonConvert.convert<String>(json['disarmingDescription']);
  if (disarmingDescription != null) {
    safeRealTimeMonitorPageEntity.disarmingDescription = disarmingDescription;
  }
  final String? disposalMeasuresAnnex = jsonConvert.convert<String>(json['disposalMeasuresAnnex']);
  if (disposalMeasuresAnnex != null) {
    safeRealTimeMonitorPageEntity.disposalMeasuresAnnex = disposalMeasuresAnnex;
  }
  final String? disarmingDescriptionAnnex = jsonConvert.convert<String>(json['disarmingDescriptionAnnex']);
  if (disarmingDescriptionAnnex != null) {
    safeRealTimeMonitorPageEntity.disarmingDescriptionAnnex = disarmingDescriptionAnnex;
  }
  final int? alramMinimum = jsonConvert.convert<int>(json['alramMinimum']);
  if (alramMinimum != null) {
    safeRealTimeMonitorPageEntity.alramMinimum = alramMinimum;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    safeRealTimeMonitorPageEntity.createTime = createTime;
  }
  final String? monitorName = jsonConvert.convert<String>(json['monitorName']);
  if (monitorName != null) {
    safeRealTimeMonitorPageEntity.monitorName = monitorName;
  }
  final String? systemName = jsonConvert.convert<String>(json['systemName']);
  if (systemName != null) {
    safeRealTimeMonitorPageEntity.systemName = systemName;
  }
  final int? dataType = jsonConvert.convert<int>(json['dataType']);
  if (dataType != null) {
    safeRealTimeMonitorPageEntity.dataType = dataType;
  }
  final String? disposalStatus = jsonConvert.convert<String>(json['disposalStatus']);
  if (disposalStatus != null) {
    safeRealTimeMonitorPageEntity.disposalStatus = disposalStatus;
  }
  final String? categoryZh = jsonConvert.convert<String>(json['categoryZh']);
  if (categoryZh != null) {
    safeRealTimeMonitorPageEntity.categoryZh = categoryZh;
  }
  final String? alarmTimeMin = jsonConvert.convert<String>(json['alarmTimeMin']);
  if (alarmTimeMin != null) {
    safeRealTimeMonitorPageEntity.alarmTimeMin = alarmTimeMin;
  }
  final String? supervisionStatusStr = jsonConvert.convert<String>(json['supervisionStatusStr']);
  if (supervisionStatusStr != null) {
    safeRealTimeMonitorPageEntity.supervisionStatusStr = supervisionStatusStr;
  }
  final int? systemId = jsonConvert.convert<int>(json['systemId']);
  if (systemId != null) {
    safeRealTimeMonitorPageEntity.systemId = systemId;
  }
  return safeRealTimeMonitorPageEntity;
}

Map<String, dynamic> $SafeRealTimeMonitorPageEntityToJson(SafeRealTimeMonitorPageEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['companyId'] = entity.companyId;
  data['companyName'] = entity.companyName;
  data['pointId'] = entity.pointId;
  data['point'] = entity.point;
  data['deviceCode'] = entity.deviceCode;
  data['alarmType'] = entity.alarmType;
  data['alarmLevel'] = entity.alarmLevel;
  data['val'] = entity.val;
  data['alarmStartTime'] = entity.alarmStartTime;
  data['alarmEndTime'] = entity.alarmEndTime;
  data['status'] = entity.status;
  data['disposalMethod'] = entity.disposalMethod;
  data['disposalMeasures'] = entity.disposalMeasures;
  data['disarmingDescription'] = entity.disarmingDescription;
  data['disposalMeasuresAnnex'] = entity.disposalMeasuresAnnex;
  data['disarmingDescriptionAnnex'] = entity.disarmingDescriptionAnnex;
  data['alramMinimum'] = entity.alramMinimum;
  data['createTime'] = entity.createTime;
  data['monitorName'] = entity.monitorName;
  data['systemName'] = entity.systemName;
  data['dataType'] = entity.dataType;
  data['disposalStatus'] = entity.disposalStatus;
  data['categoryZh'] = entity.categoryZh;
  data['alarmTimeMin'] = entity.alarmTimeMin;
  data['supervisionStatusStr'] = entity.supervisionStatusStr;
  data['systemId'] = entity.systemId;
  return data;
}

extension SafeRealTimeMonitorPageEntityExtension on SafeRealTimeMonitorPageEntity {
  SafeRealTimeMonitorPageEntity copyWith({
    int? id,
    int? companyId,
    String? companyName,
    int? pointId,
    String? point,
    String? deviceCode,
    int? alarmType,
    int? alarmLevel,
    double? val,
    String? alarmStartTime,
    String? alarmEndTime,
    int? status,
    int? disposalMethod,
    String? disposalMeasures,
    String? disarmingDescription,
    String? disposalMeasuresAnnex,
    String? disarmingDescriptionAnnex,
    int? alramMinimum,
    String? createTime,
    String? monitorName,
    String? systemName,
    int? dataType,
    String? disposalStatus,
    String? categoryZh,
    String? alarmTimeMin,
    String? supervisionStatusStr,
    int? systemId,
  }) {
    return SafeRealTimeMonitorPageEntity()
      ..id = id ?? this.id
      ..companyId = companyId ?? this.companyId
      ..companyName = companyName ?? this.companyName
      ..pointId = pointId ?? this.pointId
      ..point = point ?? this.point
      ..deviceCode = deviceCode ?? this.deviceCode
      ..alarmType = alarmType ?? this.alarmType
      ..alarmLevel = alarmLevel ?? this.alarmLevel
      ..val = val ?? this.val
      ..alarmStartTime = alarmStartTime ?? this.alarmStartTime
      ..alarmEndTime = alarmEndTime ?? this.alarmEndTime
      ..status = status ?? this.status
      ..disposalMethod = disposalMethod ?? this.disposalMethod
      ..disposalMeasures = disposalMeasures ?? this.disposalMeasures
      ..disarmingDescription = disarmingDescription ?? this.disarmingDescription
      ..disposalMeasuresAnnex = disposalMeasuresAnnex ?? this.disposalMeasuresAnnex
      ..disarmingDescriptionAnnex = disarmingDescriptionAnnex ?? this.disarmingDescriptionAnnex
      ..alramMinimum = alramMinimum ?? this.alramMinimum
      ..createTime = createTime ?? this.createTime
      ..monitorName = monitorName ?? this.monitorName
      ..systemName = systemName ?? this.systemName
      ..dataType = dataType ?? this.dataType
      ..disposalStatus = disposalStatus ?? this.disposalStatus
      ..categoryZh = categoryZh ?? this.categoryZh
      ..alarmTimeMin = alarmTimeMin ?? this.alarmTimeMin
      ..supervisionStatusStr = supervisionStatusStr ?? this.supervisionStatusStr
      ..systemId = systemId ?? this.systemId;
  }
}